package jm.java.JMM;

/**
 * @Description JMM——可见性
 * @date 2022/3/30 8:55
 */
public class Visibility {
    static boolean run = true;

    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(()->{
           while (run){

           }
        });
        t.start();
        Thread.sleep(1000);
        run = false;
    }
}
